<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ page import="org.apache.shiro.authc.ExcessiveAttemptsException"%>
<%@ page import="org.apache.shiro.authc.IncorrectCredentialsException"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit">
<title>${applicationScope.siteName }</title>
<link rel="shortcut icon" type="image/ico" href="${ctx}/static/image/baosteel.ico" />
<link href="${ctx}/static/styles/login_02/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="${ctx}/static/styles/login_02/js/jquery.js"></script>
<script src="${ctx}/static/styles/login_02/js/cloud.js" type="text/javascript"></script>

<script language="javascript">
	$(function() {
		$('.loginbox').css({
			'position' : 'absolute',
			'left' : ($(window).width() - 692) / 2
		});
		$(window).resize(function() {
			$('.loginbox').css({
				'position' : 'absolute',
				'left' : ($(window).width() - 692) / 2
			});
		})
		
		
		var isChrome = window.navigator.userAgent.indexOf("Chrome") !== -1;
	    if (isChrome) {	       
	    } else {
	    	if(getQueryString("login")!=1){
	        	parent.window.location.href='${ctx}/pub/noSupport';
	    	}
	    }
	    
	    function getQueryString(name) {
	        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
	        var r = window.location.search.substr(1).match(reg);
	        if (r != null) {return unescape(r[2]);}else{ return null};
	    }
	});
</script>
</head>
<body onload="window.form1.value_1.focus()"
	style="background-color: #1c77ac; background-image: url(${ctx}/static/styles/login_02/images/light.png); background-repeat: no-repeat;
    background-position: center top; overflow: hidden;">
	<div id="mainBody">
		<div id="cloud1" class="cloud"></div>
		<div id="cloud2" class="cloud"></div>
	</div>
	<div class="logintop">
		<span>${applicationScope.siteName }</span>
	</div>
	<div class="loginbody">
		<div class="systemlogo" style="align: center">
			<h1>
				<img src="${ctx}/static/image/baosteel.ico" style="margin-bottom: -8px" /> ${applicationScope.siteName }
			</h1>
		</div>
		<form name="form1" method="post" action="${ctx}/login">
			<div class="loginbox">
				<ul>
					<li><input name="username" type="text" id="value_1" class="loginuser" placeholder="用户名" /></li>
					<li><input name="password" type="password" class="loginpwd" placeholder="密码" /></li>
					<li><input name="" type="submit" class="loginbtn" value="登录" /> <label> <input name="rememberMe" type="checkbox" value=""
							checked="checked" /> 记住密码
					</label> <%-- <label> <a href="${ctx}/basic/userValidate/userValidate">忘记密码？</a>
					</label> --%></li>
				</ul>
			</div>
		</form>
	</div>
	<%
		String error = (String) request.getAttribute(FormAuthenticationFilter.DEFAULT_ERROR_KEY_ATTRIBUTE_NAME);
		if (error != null) {
	%>
	<div class="loginbmError">${error}</div>
	<%
		}
	%>
	<c:if test="${forceLogout }">
		<div class="loginbmError">${error}</div>
	</c:if>
	<div class="loginbm">${applicationScope.copyRight }</div>
</body>
</html>